package cn.ffcs.uec.organization.manager.impl;

import java.util.ArrayList;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import cn.ffcs.uec.organization.dao.UecOrgOrgsDao;
import cn.ffcs.uec.organization.manager.UecOrgOrgsManager;
import cn.ffcs.uec.organization.model.UecOrgOrgs;
import cn.ffcs.uec.organization.vo.OrganizationRelationVo;
import cn.ffcs.uom.common.vo.PageInfo;
import cn.ffcs.uom.common.zkplus.zul.tree.node.TreeNodeEntity;

@Service("uecOrgOrgsManager")
@Scope("prototype")
public class UecOrgOrgsManagerImpl implements UecOrgOrgsManager {

	@Resource
	private UecOrgOrgsDao uecOrgOrgsDao;

	@Override
	public UecOrgOrgs findUecOrgOrgsByOrganizationRelationVo(
			OrganizationRelationVo organizationRelationVo) {
		return uecOrgOrgsDao
				.findUecOrgOrgsByOrganizationRelationVo(organizationRelationVo);
	}

	@Override
	public UecOrgOrgs findUecOrgOrgsByUecOrgOrgs(UecOrgOrgs uecOrgOrgs) {
		return uecOrgOrgsDao.findUecOrgOrgsByUecOrgOrgs(uecOrgOrgs);
	}

	@Override
	public PageInfo queryOrganization(UecOrgOrgs uecOrgOrgs, int currentPage, int pageSize) {
		return uecOrgOrgsDao.queryOrganization(uecOrgOrgs, currentPage, pageSize);
	}

	@Override
	public String getUecOrgOrgsNameByPkOrg(String pkOrg) {
		return uecOrgOrgsDao.getUecOrgOrgsNameByPkOrg(pkOrg);
	}

	@Override
	public PageInfo queryNextUecOrgOrgsByUecOrgOrgs(UecOrgOrgs uecOrgOrgs, int currentPage,
			int pageSize) {
		return uecOrgOrgsDao.queryNextUecOrgOrgsByUecOrgOrgs(uecOrgOrgs, currentPage, pageSize);
	}

	@Override
	public String getUecOrgOrgsPreOrgByPkOrg(String pkOrg) {
		return uecOrgOrgsDao.getUecOrgOrgsPreOrgByPkOrg(pkOrg);
	}
	/**
	 * 获取父节点的查询语句,主要用于查询二级节点组织
	 */
	@Override
	public String getOrgRootByName(String orgName) {
		return uecOrgOrgsDao.getOrgRootByName(orgName);
	}
}
